<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">


<h:body>

<h:form id="productTagListform">

<p:growl id="messages" showDetail="true"/>  

<p:dataTable var="productTag" selection="#{productTagBean.selectedProductTag}" selectionMode="single" rowKey="#{productTag.productTagId}" value="#{productTagBean.productTagList}"  
     id="imageList" editable="true">  
  
        <f:facet name="header">  
            Image List  
        </f:facet>  
        
        <p:ajax event="rowEdit" listener="#{productTagBean.onEditSubmit}" update=":productTagListform:messages" />  
  
        <p:column headerText="productTagId" style="width:125px">  
            <p:cellEditor>  
                <f:facet name="output">  
                    <h:outputText value="#{productTag.productTagId}" />  
                </f:facet>  
                <f:facet name="input">  
                    <p:inputText value="#{productTag.productTagId}" style="width:100%"/>  
                </f:facet>  
            </p:cellEditor>  
        </p:column>  
  
        <p:column headerText="productId" style="width:125px">  
            <p:cellEditor>  
                <f:facet name="output">  
                    <h:outputText value="#{productTag.productId}" />  
                </f:facet>  
                <f:facet name="input">  
                    <p:inputText value="#{productTag.productId}" style="width:100%" label="Year" readonly="true" disable="true" />  
                </f:facet>  
            </p:cellEditor>  
        </p:column>  
        
        <p:column headerText="tagType" style="width:125px">  
            <p:cellEditor>  
                <f:facet name="output">  
                    <h:outputText value="#{productTag.tagType}" />  
                </f:facet>  
                <f:facet name="input">  
                <p:inputText value="#{productTag.tagType}" style="width:100%" label="Year"/> 
                </f:facet>  
            </p:cellEditor>  
        </p:column>
  
        <p:column headerText="displayOrder" style="width:125px">  
            <p:cellEditor>  
                <f:facet name="output">  
                    <h:outputText value="#{productTag.displayOrder}" />  
                </f:facet>  
                <f:facet name="input">  
                <p:inputText value="#{productTag.displayOrder}" style="width:100%" label="Year"/> 
                </f:facet>  
            </p:cellEditor>  
        </p:column>  
        
        <p:column headerText="Options" style="width:50px">  
            <p:rowEditor />  
        </p:column>
        
        <f:facet name="footer">  
             <p:commandButton  id="addInput" value="Add" icon="ui-icon-add"  action="#{productTagBean.onAddInput}"  update=":centerContentPanel"/>
             <p:commandButton  id="delete" value="Delete" icon="ui-icon-add"  action="#{productTagBean.onDelete}"    update=":centerContentPanel" />
        </f:facet>   
  
    </p:dataTable> 
</h:form>


</h:body>

</html>